package com.rayc.mall.order.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.rayc.mall.api.dto.OrderDTO;
import com.rayc.mall.api.dto.OrderFormDTO;
import com.rayc.mall.order.domain.po.Order;
import com.rayc.mall.order.domain.query.OrderPageQuery;
import com.rayc.mall.order.domain.vo.OrderDetailVO;
import com.rayc.mall.order.domain.vo.OrderVO;

import java.util.List;

/**
 * @Author: Ray-C
 * @CreateTime: 2025-03-26
 * @Description: 订单service接口
 * @Version: 1.0
 */
public interface IOrderService extends IService<Order> {

    Order createOrder(OrderFormDTO orderFormDTO);

    void markOrderPaySuccess(Long orderId);

    Page<Order> search(OrderPageQuery query);

    void updateStatus(Long id, Integer status);

    void cancelOrder(Long id);

    void confirmOrder(Long id);

    List<OrderVO> queryMyOrders();

    OrderDetailVO getOrderDetail(Long orderId);

    // feign interface
    List<OrderDTO> queryByUserId(Long userId);
}
